/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2020-2021.
 * Description: for ioremap_trace to use some variables and functions in
 *              mm/memory, so extern them.
 * Author: lijiahuan
 * Create: 2020-12-21
 */

#ifndef __RTOS_IOREMAP_H_
#define __RTOS_IOREMAP_H_

#ifdef CONFIG_RTOS_IOREMAP_TRACER
#define LOG_RANGE_SYSTEM_RAM 1
#define LOG_RANGE_ALL_MEM 2
#endif

extern int tracer_ioremap_enabled;

#ifdef CONFIG_RTOS_KBOX
#include <linux/set_kbox_region.h>
extern int ioremap_kbox_region_id;

extern unsigned int ioremap_log_size;
extern int proc_ioremap_log_size(struct ctl_table *table, int write,
				void __user *buffer,
				size_t *lenp, loff_t *ppos);
#endif

extern void ioremap_tracer(phys_addr_t paddr, unsigned long vaddr, size_t size);

#endif
